﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true"
    CodeBehind="TrustRegionList.aspx.cs" Inherits="MockPrjTeam2.Pages.Views.TrustRegionList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        function Confirm_Active() {
            return confirm('Do you want to make this Service active ?');
        }
    </script>
    <table style="width: 100%">
        <tr>
            <td colspan="3" style="font-family: Arial, Helvetica, sans-serif; font-size: large;
                font-weight: bold; color: #639A18">
                Trust Region List
            </td>
        </tr>
        <tr>
            <td style="width: 80%; height: 20px">
                <asp:LinkButton ID="lbtnAll" runat="server" CommandName="0-9-a-z" OnCommand="StartWithByNames"> All </asp:LinkButton>|
                <asp:LinkButton ID="lbtn09" runat="server" CommandName="0-9" OnCommand="StartWithByNames"> 0-9 </asp:LinkButton>|
                <asp:LinkButton ID="lbtnAE" runat="server" CommandName="a-e" OnCommand="StartWithByNames"> A B C D E </asp:LinkButton>|
                <asp:LinkButton ID="lbtnFJ" runat="server" CommandName="f-j" OnCommand="StartWithByNames"> F G H I J </asp:LinkButton>|
                <asp:LinkButton ID="lbtnKN" runat="server" CommandName="k-n" OnCommand="StartWithByNames"> K L M N </asp:LinkButton>|
                <asp:LinkButton ID="lbtnOR" runat="server" CommandName="o-r" OnCommand="StartWithByNames"> O P Q R </asp:LinkButton>|
                <asp:LinkButton ID="lbtnSV" runat="server" CommandName="s-v" OnCommand="StartWithByNames"> S T U V  </asp:LinkButton>|
                <asp:LinkButton ID="lbtnWZ" runat="server" CommandName="w-z" OnCommand="StartWithByNames"> W X Y Z</asp:LinkButton>
            </td>
            <td style="width: 178; height: 20px">
                <asp:Button ID="btnCreat" runat="server" Text="Creat" onclick="btnCreat_Click" Width="82px" />
            </td>
            <td style="height: 20px ;width: 37%">
                <asp:CheckBox ID="CheckBoxInActive" runat="server" Text=" Include In-active" AutoPostBack="True"
                    OnCheckedChanged="CheckBoxInactiveCheckedChanged" />
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="3">
                &nbsp; &nbsp; &nbsp;
                <asp:GridView ID="grvTrustRegionList" runat="server" Width="100%" AutoGenerateColumns="False"
                    OnPageIndexChanging="grvTrustRegionList_PageIndexChanging" AllowPaging="True" PageSize="5">
                    <Columns>
                        <asp:TemplateField HeaderText="TrustRegionName">
                            <ItemTemplate>
                               <asp:LinkButton ID="LinkButtonTrustRegionName" CausesValidation="false" runat="server" CommandName='<%# Eval("TrustRegionID") %>' CommandArgument='<%#Eval("IsActive") %>'
                                    OnClientClick='<%# !(bool)Eval("IsActive") ? "return Confirm_Active();" : string.Empty %>' 
                                    OnCommand="LbtnTrustRegionName_Command"><%# Eval("TrustRegionName")%>
                                </asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Description" DataField="Description" />
                        <asp:TemplateField HeaderText="National/Country" SortExpression="Country">
                            <ItemTemplate>
                                <asp:Label ID="LabelCountry" runat="server" Text='<%# Eval("CountryName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Is Active?">
                            <ItemTemplate>
                                <asp:Label ID="LabelIsActive" runat="server" Text='<%#(bool) Eval("IsActive") ? "Yes" :"No" %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <blockquote>There are no items to show.</blockquote>
                    </EmptyDataTemplate>
                  <PagerStyle CssClass="pagination_table"></PagerStyle>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
